TEXTURE SETS DOCUMENTATION Version: 1.21.60.24
This is documentation for a preview release of Minecraft. New features, components, and capabilities in this release are not final and might change without notice before the final release.
Be sure to check the documentation once the release is out of preview if your add-on isn't working properly. Resource and Behavior Packs created for the preview are not guaranteed to work on the final release.
Index
Texture Sets
Minecraft supports a Physically Based Rendering (PBR) color pipeline (e.g., used for Ray Tracing). This uses more texture data than simply 'color' to enable richer, more realistic visuals. With the PBR approach, you can have layers for different specular reflections, emissivity, normal maps, etc., which goes beyond the Classic color pipeline for Vanilla Minecraft. Texture Sets have been added as the feature for defining multiple PBR layers for a texture resource. Texture sets are data-driven from JSON files.
Back to top
Texture Set JSON Schema
The schema defines the structure for JSON files used in texture sets.
{
"format_version": "1.16.100",
"minecraft:texture_set": {
"color": "color_texture",
"normal": "normal_texture",
"heightmap": "heightmap_texture",
"metalness_emissive_roughness": "mer_texture"
}
}
Back to top
Layers
A texture_set.json
file may specify several layers. Layers are references to texture image resources or can be defined in JSON as uniform solid values.
Color
- This is an RGB 3-channel image (defaults to uniform alpha of 1.0), or an RGBA 4-channel image, or a 4-value array for a uniform color with alpha.
- This is the only required layer.
- It is the only layer used by the Classic pipeline.
- Typically, there is lighting baked into the color image.
Back to top
Normal
- 3-channel normal map image (or 4-channel where the 4th channel is ignored).
- Mutually exclusive with the
heightmap
layer.
Back to top
Heightmap
- 1-channel layer image or a single value in JSON for a uniform heightmap.
- Mutually exclusive with the
normal
layer.
Back to top
- 3-channel image (or 4-channel where the 4th channel is ignored) or a 3-value array for a uniform MER.
- RGB images map Red to Metalness, Green to Emissive, and Blue to Roughness.
Back to top
Instead of referencing a texture image for a Texture Set layer, values can be specified in the texture_set.json
file. The values in the JSON can be specified in the following formats:
- 0 to 255 numeric range, or as a vector of such integers for a multi-channel layer.
- Hexadecimal RGB or ARGB for 3 and 4 channels respectively.
Back to top
Invalid *.texture_set.json
If a Texture Set is invalid, the system logs a CONTENT_ERROR
and the Texture Set will not be used. A Texture Set is invalid if:
- JSON data cannot be parsed or doesn't meet the Texture Set schema.
- The color layer is not specified (required).
- Both heightmap and normal layers are defined.
- A referenced texture does not exist or cannot be parsed.
- A layer is defined with an unexpected number of channels.
Back to top
Resource Stack Behavior
- Texture Set definitions can only reference images that exist in the same resource pack as the definition.
- Texture images in higher priority resource packs do not override a Texture Set's reference to a texture in its own pack.
- In the resource pack stack, higher priority pack definitions override lower priority ones.
Back to top
Referencing Texture Resources
The priority of file extensions, in case of duplicate image references, is: .tga
> .png
> .jpg
> .jpeg
. For example, if grass.png
and grass.tga
both exist, grass.tga
will be chosen.
Back to top